﻿using System;
using System.Net;

namespace SCM.Common
{
    public class SCMException : Exception
    {
        public SCMException(string message, HttpStatusCode httpStatusCode, ResultCode resultCode, object context = null, Exception e = null) : base(message, e)
        {
            this.HttpStatusCode = httpStatusCode;
            this.Context = context;
            this.ResultCode = resultCode;
        }
        public HttpStatusCode HttpStatusCode { get; set; }

        public ResultCode ResultCode { get; set; }

        public bool IsWriteLog { get; set; } = true;
        public object Context { get; set; }
    }
}
